
//- This Source Code Form is subject to the terms of the Mozilla Public
//- License, v. 2.0. If a copy of the MPL was not distributed with this
//- file, You can obtain one at http://mozilla.org/MPL/2.0/.
//-
//- Copyright (c) 2021-present Kaleidos Ventures SL

nav.navbar(ng-if="vm.isEnabledHeader")
    .nav-left
        a.logo(
            ng-if="!vm.isAuthenticated"
            href="https://taiga.io/",
            title="{{'PROJECT.NAVIGATION.HOMEPAGE' | translate}}"
        )
            include ../../svg/logo.svg

        a.logo(
            ng-if="vm.isAuthenticated"
            href="#",
            tg-nav="home",
            title="{{'PROJECT.NAVIGATION.HOMEPAGE' | translate}}"
        )
            include ../../svg/logo.svg

        .topnav-dropdown-wrapper(
            ng-if="vm.isAuthenticated"
            tg-dropdown-project-list
            active="vm.active == 'projects' || vm.active == 'project'"
        )

    .nav-right.center(ng-if="!vm.isAuthenticated")
        a.login(
            ng-click="vm.login()"
            href="#",
            title="{{ 'LOGIN_COMMON.ACTION_SIGN_IN' | translate }}"
            translate="LOGIN_COMMON.ACTION_SIGN_IN"
        )
        a.register(
            href="#"
            ng-if="vm.publicRegisterEnabled"
            tg-nav="register"
            title="{{ 'REGISTER_FORM.ACTION_SIGN_UP' | translate }}"
            translate="REGISTER_FORM.ACTION_SIGN_UP"
        )

    .nav-right(ng-if="vm.isAuthenticated")
        a(
            tg-nav="discover",
            ng-class="{'active': vm.active == 'discover' }"
            title="{{'PROJECT.NAVIGATION.DISCOVER_TITLE' | translate}}"
        )
            tg-svg(svg-icon="icon-compass")

        .topnav-dropdown-wrapper.nav-bar-support(ng-if="vm.customSupportUrl")
            a(
                ng-if="vm.customSupportUrl"
                href="{{ vm.customSupportUrl }}",
                target="_blank",
                title="{{'PROJECT.NAVIGATION.HELP_TITLE' | translate}}",
            )
                tg-svg(svg-icon="icon-help-circle")

            .navbar-dropdown.navigation-help
                ul
                    li(ng-if="vm.userpilotEnabled")
                        a.secondary(
                            href="#"
                            title="{{ vm.userPilotTitle }}"
                        )
                            tg-svg(svg-icon="icon-lifeguard")
                            span {{ vm.userPilotTitle }}

                    li
                        a.secondary(
                            href="{{ vm.customSupportUrl }}",
                            target="_blank",
                            title="{{ 'PROJECT.NAVIGATION.TAIGA_COMMUNITY_TITLE' | translate }}"
                        )
                            tg-svg(svg-icon="icon-resources")
                            span {{ 'PROJECT.NAVIGATION.TAIGA_COMMUNITY' | translate }}

                    li
                        a.secondary(
                            ng-show="vm.isFeedbackEnabled"
                            href="#"
                            ng-click="vm.sendFeedback()",
                            title="{{ 'PROJECT.NAVIGATION.FEEDBACK_TITLE' | translate }}"
                        )
                            tg-svg(svg-icon="icon-message-square")
                            span {{ 'PROJECT.NAVIGATION.FEEDBACK' | translate }}

        .topnav-dropdown-wrapper(
            tg-dropdown-notifications
            active="vm.active == 'notifications'"
        )

        div(tg-dropdown-user)
